<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
	<%@include file="/WEB-INF/jsp/hadmin/contentHeader.jsp"%>
</head>
<body class="gray-bg">
    <div class="row wrapper border-bottom white-bg page-heading">
		<div class="col-sm-12">
               <h:tableButton>
             		<div class="col-md-5">
                   		<input placeholder="角色名" class="form-control" type="text" name="name">
                 	</div>
               </h:tableButton>
               <h:table excludeAll="true">
           			 <th data-sortable="true" data-field="name">角色名</th>
		            <th data-sortable="true" data-field="description">描述</th>
		             <th data-formatter="powerFormatter" data-sortable="true" data-field="powerSet">权限</th>
               </h:table>
			<%-- <%@include file="/WEB-INF/jsp/hadmin/include/table.jsp" %> --%>
         </div>
    </div>
 
    <script type="text/javascript">
    	/* var tableConfig = {
   			uniqueId:"Id",
   		}; */
    	
    	function powerFormatter(argu) {
   			if(!argu){
   				return "";
   			}
			var powerName ="";
    		for(var i = 0;i<argu.length;i++){
    			//console.log(argu[i].name);
    			if(i!=0){
    				powerName+=",";
    			}
    			powerName += argu[i].name;
    		} 
    		if(powerName.length>75){
    			powerName = powerName.substring(0,75) +"...";
    		}
			return powerName;
		}
    </script>
    <h:configBootstrapTable />
	<%-- <%@include file="/WEB-INF/jsp/hadmin/include/tableInit.jsp" %> --%>
</body>

</html>
